#include "SoundSettings.h"
#include "SimpleAudioEngine.h"

using namespace cocos2d;
using namespace CocosDenshion;

bool static muttedBackground=false;
bool static muttedSound=false;
void playBackground(){
	if(muttedBackground)
		return;
	if(!SimpleAudioEngine::sharedEngine()->isBackgroundMusicPlaying()){
		SimpleAudioEngine::sharedEngine()->playBackgroundMusic("bck_music.mp3",true);
	}

}
void shouldPlay(bool v)
{
	muttedBackground = !v;
}

void setVolume(float v)
{
	SimpleAudioEngine::sharedEngine()->setBackgroundMusicVolume(v);
}

void stopMusic(){
	SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
}

float getBackgroundVolume(){
	return SimpleAudioEngine::sharedEngine()->getBackgroundMusicVolume();
}

void shouldPlaySound(bool v)
{
	muttedSound = !v;
}
void setSoundVolumne(float v)
{
	SimpleAudioEngine::sharedEngine()->setEffectsVolume(v);
}

float getSoundVolume()
{
	return SimpleAudioEngine::sharedEngine()->getEffectsVolume();
}
void playSound()
{
	if(muttedSound)
			return;
	//SimpleAudioEngine::sharedEngine()->playEffect("bck_music.mp3",true);
}
void stopSound()
{
	//SimpleAudioEngine::sharedEngine()->stopAllEffects();
}
